Skip to content

fix(ddd): Normalize Email value object to lowercase#75

Merged
pourdaavar merged 1 commit into
mainfrom
fix/email-lowsercase
Jul 5, 2026
Merged

fix(ddd): Normalize Email value object to lowercase#75
pourdaavar merged 1 commit into
mainfrom
fix/email-lowsercase

Conversation

@pourdaavar

Copy link
Copy Markdown
Contributor

Summary

  • Normalize Email inputs to lowercase in the constructor so mixed-case addresses are stored consistently
  • Treat emails that differ only by case as equal via equals()
  • Expand Email VO tests for validation errors, metadata, and lowercase normalization
  • Add a @rineex/ddd patch changeset

Motivation

Email local parts are case-insensitive per RFC 5321. Normalizing on construction avoids duplicate identities and inconsistent comparisons when users enter addresses with different casing.

Test plan

  • Email unit tests pass (14 tests, including lowercase normalization and case-insensitive equality)
  • Full monorepo test suite passes via pre-push hook

Made with Cursor

Store email addresses in lowercase so differently cased inputs compare
equal. Expand Email VO tests for validation errors and normalization.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: eee7b25

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@rineex/ddd Patch
@rineex/auth-core Patch
@rineex/authentication-method-otp Patch
@rineex/authentication-method-passwordless Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pourdaavar pourdaavar self-assigned this Jul 5, 2026
@pourdaavar pourdaavar merged commit 48a3817 into main Jul 5, 2026
5 checks passed
@pourdaavar pourdaavar mentioned this pull request Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant